@extends("layout.main")
@section("content")
<div class="fly-home fly-panel" style="background-image: url();">
    <img src="{{$user->face}}" alt="{{$user->name}}">
    <h1>{{$user->name}}
        <i class="iconfont           icon-nv        "></i></h1>
    <p class="fly-home-info">
        <i class="iconfont icon-kiss" title="飞吻"></i>
        <span style="color: #FF7200;">{{$user->kiss}}飞吻</span>
        <i class="iconfont icon-shijian"></i>
        <span>{{$user->created_at}}加入</span>
        <i class="iconfont icon-chengshi"></i>
        <span>来自{{$user->city}}</span></p>
    <p class="fly-home-sign">@if(empty($user->sign))（这个人懒得留下签名）@endif{{$user->sign}}</p></div>
<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md6 fly-home-jie">
            <div class="fly-panel">
                <h3 class="fly-panel-title">{{$user->name}} 最近的提问</h3>
                <ul class="jie-row">
                    @foreach($user->question as $question)
                    <li>
                        <a href="/question/{{$question->id}}/show" class="jie-title">{{$question->title}}</a>
                        <i>{{$question->created_at->diffForHumans()}}</i>
                        <em class="layui-hide-xs">{{$question->view_num}}阅/{{count($question->answer)}}答</em></li>
                    @endforeach
                </ul>
            </div>
        </div>
        <div class="layui-col-md6 fly-home-da">
            <div class="fly-panel">
                <h3 class="fly-panel-title">{{$user->name}}  最近的回答</h3>
                <ul class="home-jieda">
                    @foreach($user->answer as $answer)
                    <li>
                        <p>
                            <span>{{$answer->created_at}}</span>在
                            <a href="/question/{{$answer->question->id}}/show" target="_blank">{{$answer->question->title}}</a>中回答：</p>
                        <div class="home-dacontent">{!! $answer->content !!}
                            <br>
                            <!--<a href="http://www.layui.com/doc/modules/laytpl.html#delimiters" target="_blank">http://www.layui.com/doc/modules/laytpl.html#delimiters</a></div>-->
                    </li>
                    @endforeach

                </ul>
            </div>
        </div>
    </div>
</div>
@endsection